﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;

// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238

namespace RoboRun
{
    /// <summary>
    /// An empty page that can be used on its own or navigated to within a Frame.
    /// </summary>
    public sealed partial class HelpandAboutPage : Page
    {
        public HelpandAboutPage()
        {
            this.InitializeComponent();
            scrollView.Height = MainMenu.height - 3 * MainMenu.offset-100*MainMenu.height/1080;
            scrollView.Width = MainMenu.width;
            textBlock.Height = MainMenu.height - 3 * MainMenu.offset - 100 * MainMenu.height / 1080;
            textBlock.Width = MainMenu.width;
            backToMenu.Height = 100 * MainMenu.height / 1080;
            backToMenu.Width = 300 * MainMenu.width / 1920;
            backToMenu.Content = "Back To Menu";
           
            backToMenu.Margin = new Thickness(0, MainMenu.offset, 0, 0);
            scrollView.Margin = new Thickness(0,MainMenu.offset + 50 * MainMenu.height/1080+100*MainMenu.height/1080,0,0);
            textBlock.Margin = new Thickness(0, MainMenu.offset + 50, 0, 0);
            textBlock.FontSize = MainMenu.height/25;
            textBlock.FontWeight = Windows.UI.Text.FontWeights.Light;
            textBlock.Text = "This game introduces kids & students to the world of programming. RoboRun aims to build the player's algorithmic construction and analysis skills.\n\n"+
            "We have integrated Microsoft Research's TouchDevelop platform into the game by allowing you to automatically convert your solution to TouchDevelop compatible syntax. You will be able to export your solution to the RoboRun TouchDevelop Library and use the platform to further enhance your code!\n\n"+
            "To learn about the game's mechanics and how to play, refer to the Tutorial section found in the main menu.\n\n"+
            "This build contains 9 levels aimed to introduce you to the gameplay of RoboRun. Future builds will include 4x4 and 5x5 grids for more fun and challenging gameplay and a more sophisticated TouchDevelop export feature."+
            "\n\nCreated and developed by Siri Vinay and Manoj Vaseekharan of UCL Computer Science.";
        }

        /// <summary>
        /// Invoked when this page is about to be displayed in a Frame.
        /// </summary>
        /// <param name="e">Event data that describes how this page was reached.  The Parameter
        /// property is typically used to configure the page.</param>
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
        }

        private void backToMenu_Click_1(object sender, RoutedEventArgs e)
        {
            this.Frame.Navigate(typeof(MainMenu));
        }
    }
}
